<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="index.css">
    <title>Document</title>
    <style>

    </style>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }
        
        ul {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        
        li {
            position: relative;
            display: inline-block;
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>
    <ul id="myList">

    </ul>
    <script src="index.js"></script>
    <script>
        window.onload = function() {
            var node = document.createElement("li");


            for (let j = 0; j < 100; j++) {
                var node = document.createElement("li");
                document.getElementById("myList").appendChild(node);
                // console.log(document.getElementById("myList"));
            }
            var li = document.getElementsByTagName("li");


            for (var i = 0; i < li.length; i++) {
                if (i < li.length / 2) {
                    lanui.init({ //元素内部加载
                        element: li[i],
                        height: i,
                        width: i,
                        color: `#0` + i * 10000,
                    });
                } else
                    lanui.init({ //元素内部加载
                        element: li[i],
                        height: i,
                        width: i,
                        color: `#E` + i * 10000,
                        type: 'asd',
                    });
            }

            lanui.init(); //全屏加载
        }
    </script>
</body>

</html>